package org.come.Jpanel;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.math.BigDecimal;
import java.util.Map;
import java.util.Arrays;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.swing.BorderFactory;
import javax.swing.DefaultListModel;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

import com.tool.image.ImageMixDeal;
import com.tool.tcp.Sprite;
import com.tool.tcp.SpriteFactory;
import org.come.Frame.HuaLianJframe;
import org.come.Frame.PetSkillsJframe;
import org.come.Frame.XYJframe;
import org.come.bean.ConfigureBean;
import org.come.bean.Skill;
import org.come.entity.RoleSummoning;
import org.come.model.Configure;
import org.come.mouslisten.ShowPetSkillsMouslisten;
import org.come.socket.Agreement;
import org.come.socket.SendMessageUntil;
import org.come.until.*;
import com.tool.btn.DeleteSkillBtn;
import com.tool.btn.FormsOnOffBtn;
import com.tool.btn.GoodAndPetLockBtn;
import com.tool.tcpimg.RichLabel;
import com.tool.tcpimg.UIUtils;
import com.updateNew.MyIsif;

import come.tool.FightingData.FBUtil;



public class PetSkillsJpanel extends JPanel {

    private RichLabel box;
    public  int skllNum;
    private JLabel[] labPetskills = new JLabel[9];// 召唤兽的九个技能框
    private JLabel[] labPetskillsTS = new JLabel[7];// 召唤兽的天生技能
    private JLabel[] qlPetskills = new JLabel[6];//启灵技能
    private JLabel effect = new JLabel(){
        @Override
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            PetSkillsJpanel.tcp.updateToTime(ImageMixDeal.userimg.getTime(), 0);
            PetSkillsJpanel.tcp.draw(g, 0, 0);
        }
    };//启灵技能
    public static ShowPetSkillsMouslisten[] showPetSkills = new ShowPetSkillsMouslisten[9];// 召唤兽的九个技能框
    private ShowPetSkillsMouslisten[] showPetSkillsTS = new ShowPetSkillsMouslisten[7];// 召唤兽的天生技能框
    private ShowPetSkillsMouslisten[] showQlPetSkills = new ShowPetSkillsMouslisten[6];//6个启灵
    private DeleteSkillBtn supportListBtn,// 支援列表
            deleteSkillBtn, deleteQlSkillBtn;// 删除技能 // 删除启灵技能
    private JList<String> listNaturalskill,// 天生技能列表
            listpetskill;// 后面学习的技能列表
    private DefaultListModel<String> modelNaturalskill,// 天生技能列表对象
            modelpetskill;// 后面学习的技能列表对象

    private JScrollPane jScrollPane1,// 天生技能列表滚动条
            jScrollPane2;// 后面学习的技能列表滚动条
    private final boolean shoptext = false;// 判断是否显示预选框描述
    private String petskillID = "";// 选中的召唤兽技能id
    private JLabel[] naturalSkills;//增加天生技能
    private int petskillNO;// 选中的召唤兽技能位置
    public static Sprite tcp = SpriteFactory.VloadSprite("resource/mouse/flicker.tcp", null);
    private int goodPosition;// 判断预选框的位置
    private GoodAndPetLockBtn btnlock, // 召唤兽技能加锁按钮
            btnunlock;// 召唤兽技能解锁按钮
    private ImageIcon icon;
    private ImageIcon licon = new ImageIcon("inkImg/hongmu/2/78_png.xy2uiimg.btn_plock.png");

    public PetSkillsJpanel() throws Exception {
        ConfigureBean allConfigure = UserMessUntil.getConfigureBean();
        Map<BigDecimal, Configure> item = allConfigure.getAllConfigure();
        Configure configure = item.get(new BigDecimal(1));
        Configure configure7 = item.get(new BigDecimal(7));
        if(configure7.getZhsjngs().equals("新")) {
            if(MyIsif.getStyle().equals("水墨UI")) {
                icon = new ImageIcon("inkImg/newbackground/S100J9a.png");//召唤兽水墨界面
                if(configure.getZhsjngs()!=null) {
                    skllNum = Integer.parseInt(configure.getZhsjngs());
                    if(skllNum == 7) {
                        icon = new ImageIcon("inkImg/newbackground/S100J7.png");
                    }
                    if(skllNum == 5) {
                        icon = new ImageIcon("inkImg/newbackground/S100J5.png");
                    }
                    labPetskills = new JLabel[skllNum];// 召唤兽的九个技能框
                    showPetSkills = new ShowPetSkillsMouslisten[skllNum];// 召唤兽的九个技能框
                }

                add(effect);
                box = new RichLabel();
                if(skllNum == 7 || skllNum == 5) {
                    if(skllNum == 7) {
                        this.setPreferredSize(new Dimension(570, 415));
                    }else {
                        this.setPreferredSize(new Dimension(570, 415));
                    }
                }else {
                    this.setPreferredSize(new Dimension(570, 447));
                }

                this.setLayout(null);
                this.setBackground(UIUtils.Color_BACK);
                // 关闭按钮事件
                FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/old/2/1.png", 1, 18);
                if(skllNum == 7 || skllNum == 5) {
                    if(skllNum == 7){
                        offBtn.setBounds(570 - 37, 10, 25, 25);
                    }else {
                        offBtn.setBounds(570 - 37, 10, 25, 25);
                    }
                }else {
                    offBtn.setBounds(570 - 37, 10, 25, 25);
                }
                this.add(offBtn);
            }else {
                icon = new ImageIcon("skin/8100226/button/hongmu/九技能红木.png");//召唤兽技能红木界面
                if(configure.getZhsjngs()!=null) {
                    skllNum = Integer.parseInt(configure.getZhsjngs());
                    if(skllNum == 7) {
                        icon = new ImageIcon("inkImg/newbackground/S100J7.png");
                    }
                    if(skllNum == 5) {
                        icon = new ImageIcon("inkImg/newbackground/S100J5.png");
                    }
                    labPetskills = new JLabel[skllNum];// 召唤兽的九个技能框
                    showPetSkills = new ShowPetSkillsMouslisten[skllNum];// 召唤兽的九个技能框
                }

                add(effect);
                box = new RichLabel();
                if(skllNum == 7 || skllNum == 5) {
                    if(skllNum == 7) {
                        this.setPreferredSize(new Dimension(570, 415));
                    }else {
                        this.setPreferredSize(new Dimension(570, 415));
                    }
                }else {
                    this.setPreferredSize(new Dimension(570, 447));
                }

                this.setLayout(null);
                this.setBackground(UIUtils.Color_BACK);
                // 关闭按钮事件
                FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/hongmu/s74.png", 1, 18);
                if(skllNum == 7 || skllNum == 5) {
                    if(skllNum == 7){
                        offBtn.setBounds(570 - 37, 10, 25, 25);
                    }else {
                        offBtn.setBounds(570 - 37, 10, 25, 25);
                    }
                }else {
                    offBtn.setBounds(570 - 37, 10, 25, 25);
                }
                this.add(offBtn);
            }
            // 天生技能列表对象
            modelNaturalskill = new DefaultListModel<String>();
            // 天生技能列表
            listNaturalskill = new JList<String>() {
                {
                    setOpaque(false);
                } // instance initializer
            };
            listNaturalskill.setSelectionBackground(new Color(33, 42, 52));
            listNaturalskill.setSelectionForeground(Color.YELLOW);
            listNaturalskill.setForeground(Color.YELLOW);
            listNaturalskill.setFont(new Font("微软雅黑", 1, 14));
            listNaturalskill.setBackground(UIUtils.Color_BACK); // 设置列表框为透明背景
            listNaturalskill.setModel(modelNaturalskill);
            listNaturalskill.addMouseListener(new MouseListener() {
                @Override
                public void mouseReleased(MouseEvent e) {
                    // TODO Auto-generated method stub

                }

                @Override
                public void mousePressed(MouseEvent e) {

                }

                @Override
                public void mouseExited(MouseEvent e) {
                    // TODO Auto-generated method stub
                    if (MessagrFlagUntil.ImgFlagImg.equals(MessagrFlagUntil.MOUSE12)) {
                        MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
                    }
                }

                @Override
                public void mouseEntered(MouseEvent e) {
                    // TODO Auto-generated method stub
                    if (MessagrFlagUntil.ImgFlagImg.equals(MessagrFlagUntil.MOUSE1)) {
                        MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE12);
                    }
                }
                @Override
                public void mouseClicked(MouseEvent e) {
                    if (listNaturalskill.getSelectedValue() != null) {
                        String skillname = listNaturalskill.getSelectedValue();
                        // 获得该召唤兽技能
                        Skill skill = UserMessUntil.getskill1(skillname);
                        // 先判断这个表格是否有召唤兽技能信息
                        if (skill != null) {// 有召唤兽技能
                            PetSkillsJframe.getPetSkillsJframe().getPetSkillsJpanel().skillmsg(skill,0);
                            if("200193".equals(UserMessUntil.getChosePetMes().getSummoningid())&&skill.getSkillid().equals("25000")){
                                FormsManagement.showForm(688);
                            }
                        } else {
                            PetSkillsJframe.getPetSkillsJframe().getPetSkillsJpanel().getBox().setText(null);
                        }
                    }
                }
            });

            // 后面学习的技能列表滚动条
            if(skllNum == 7) {
                jScrollPane2 = new JScrollPane(box);
                jScrollPane2.setVerticalScrollBarPolicy(22);
                jScrollPane2.getVerticalScrollBar().setUI(new SrcollPanelUI());
                jScrollPane2.getVerticalScrollBar().setUnitIncrement(30);
                jScrollPane2.getViewport().setOpaque(false);
                jScrollPane2.setOpaque(false);
                jScrollPane2.setBounds(322, 133, 220, 288);
                jScrollPane2.setBorder(BorderFactory.createEmptyBorder());
                jScrollPane2.setHorizontalScrollBarPolicy(31);
                this.add(jScrollPane2);
            }else {
                jScrollPane2 = new JScrollPane(box);
                jScrollPane2.setVerticalScrollBarPolicy(22);
                jScrollPane2.getVerticalScrollBar().setUI(new SrcollPanelUI());
                jScrollPane2.getVerticalScrollBar().setUnitIncrement(30);
                jScrollPane2.getViewport().setOpaque(false);
                jScrollPane2.setOpaque(false);
                jScrollPane2.setBounds(322, 133, 220, 288);
                jScrollPane2.setBorder(BorderFactory.createEmptyBorder());
                jScrollPane2.setHorizontalScrollBarPolicy(31);
                this.add(jScrollPane2);
            }

            if(skllNum == 7 || skllNum == 5) {
                if(skllNum == 7) {
                    int sx = 103;
                    // 支援列表
                    supportListBtn = new DeleteSkillBtn("skin/8100226/button/49.png", 1, "支援列表");
                    supportListBtn.setBounds(63, 288+sx, 68, 17);
                    this.add(supportListBtn);

                    // 删除技能
                    deleteSkillBtn = new DeleteSkillBtn("skin/8100226/button/49.png", 1, "删除技能");
                    deleteSkillBtn.setBounds(230, 288+sx, 68, 17);
                    this.add(deleteSkillBtn);
                }else {
                    // 支援列表
                    supportListBtn = new DeleteSkillBtn("skin/8100226/button/49.png", 1, "支援列表");
                    supportListBtn.setBounds(63, 390, 68, 17);
                    this.add(supportListBtn);

                    // 删除技能
                    deleteSkillBtn = new DeleteSkillBtn("skin/8100226/button/49.png", 1, "删除技能");
                    deleteSkillBtn.setBounds(230, 390, 68, 17);
                    this.add(deleteSkillBtn);
                }
            }else {
                // 支援列表
                supportListBtn = new DeleteSkillBtn("skin/8100226/button/49.png", 1, "支援列表");
                supportListBtn.setBounds(63, 390, 68, 17);
                this.add(supportListBtn);

                // 删除技能
                deleteSkillBtn = new DeleteSkillBtn("skin/8100226/button/49.png", 1, "删除技能");
                deleteSkillBtn.setBounds(230, 390, 68, 17);
                this.add(deleteSkillBtn);
//            	deleteQlSkillBtn = new DeleteSkillBtn("skin/8100226/button/49.png", 1, "删除启灵");
//            	deleteQlSkillBtn.setBounds(450, 424, 68, 17);
//            	this.add(this.deleteQlSkillBtn);
            }
            if(skllNum == 5) {

                if(configure7.getLyssx().equals("开")){
                    // 召唤兽加锁按钮
                    btnlock = new GoodAndPetLockBtn("skin/8100226/newbutton/K156.png", 1, 5);
                    btnlock.setBounds(60, 112, 19, 20);
                    this.add(btnlock);

                    // 召唤兽加锁按钮
                    btnunlock = new GoodAndPetLockBtn("skin/8100226/newbutton/K157.png", 1, 6);
                    btnunlock.setBounds(80, 112, 19, 20);
                    this.add(btnunlock);
                }

//            	// 第一行第一个技能框
//                labPetskills[0] = new JLabel();
//                labPetskills[0].setBounds(155, 163, 50, 50);
//                showPetSkills[0] = new ShowPetSkillsMouslisten(0);
//                labPetskills[0].addMouseListener(showPetSkills[0]);
//                this.add(labPetskills[0]);
//                // 第二行第一个技能框
//                labPetskills[1] = new JLabel();
//                labPetskills[1].setBounds(72, 253, 50, 50);
//                showPetSkills[1] = new ShowPetSkillsMouslisten(1);
//                labPetskills[1].addMouseListener(showPetSkills[1]);
//                this.add(labPetskills[1]);

//                //  第二行第二个技能框
//                labPetskills[4] = new JLabel();
//                labPetskills[4].setBounds(154, 252, 50, 50);
//                showPetSkills[4] = new ShowPetSkillsMouslisten(4);
//                labPetskills[4].addMouseListener(showPetSkills[4]);
//                this.add(labPetskills[4]);

//                // 第二行第三个技能框
//                labPetskills[2] = new JLabel();
//                labPetskills[2].setBounds(237, 252, 50, 50);
//                showPetSkills[2] = new ShowPetSkillsMouslisten(2);
//                labPetskills[2].addMouseListener(showPetSkills[2]);
//                this.add(labPetskills[2]);
                // 第三行第一个技能框
//                labPetskills[3] = new JLabel();
//                labPetskills[3].setBounds(154, 341, 50, 50);
//                showPetSkills[3] = new ShowPetSkillsMouslisten(3);
//                labPetskills[3].addMouseListener(showPetSkills[3]);
//                this.add(labPetskills[3]);

                // 第一行第一个技能框
                this.labPetskills[0] = new JLabel();
                this.labPetskills[0].setBounds(155, 163, 50, 50);
                JLabel jLabel = new JLabel();
                jLabel.setBounds(155, 163, 50, 50);
                int[] arr = {155, 163};
                this.showPetSkills[0] = new ShowPetSkillsMouslisten(0, this, arr);
                this.labPetskills[0].addMouseListener(this.showPetSkills[0]);
                this.add(this.labPetskills[0]);

                // 第二行第一个技能框1
                this.labPetskills[1] = new JLabel();
                this.labPetskills[1].setBounds(72, 253, 50, 50);
                jLabel = new JLabel();
                jLabel.setBounds(72, 253, 50, 50);
                arr = new int[]{72, 253};
                this.showPetSkills[1] = new ShowPetSkillsMouslisten(1, this, arr);
                this.labPetskills[1].addMouseListener(this.showPetSkills[1]);
                this.add(this.labPetskills[1]);

                // 第二行第二个技能框
                labPetskills[4] = new JLabel();
                labPetskills[4].setBounds(154, 252, 50, 50);
                arr = new int[]{154, 252};
                showPetSkills[4] = new ShowPetSkillsMouslisten(4, this, arr);
                labPetskills[4].addMouseListener(showPetSkills[4]);
                this.add(labPetskills[4]);

                // // 第二行第三个技能框
                this.labPetskills[3] = new JLabel();
                this.labPetskills[3].setBounds(237, 252, 50, 50);
                arr = new int[]{237, 252};
                this.showPetSkills[3] = new ShowPetSkillsMouslisten(3, this, arr);
                this.labPetskills[3].addMouseListener(this.showPetSkills[3]);
                this.add(this.labPetskills[3]);

                // 第三行第一个技能框
                labPetskills[2] = new JLabel();
                labPetskills[2].setBounds(154, 341, 50, 50);//高清
                arr = new int[]{154, 341};
                showPetSkills[2] = new ShowPetSkillsMouslisten(2, this, arr);
                labPetskills[2].addMouseListener(showPetSkills[2]);
                this.add(labPetskills[2]);



            }else if(skllNum == 7) {
                int sx = 103;
                int sy = -2;

                if(configure7.getLyssx().equals("开")){
                    // 召唤兽加锁按钮
                    btnlock = new GoodAndPetLockBtn("skin/8100226/newbutton/K156.png", 1, 5);
                    btnlock.setBounds(60, 112, 19, 20);
                    this.add(btnlock);

                    // 召唤兽加锁按钮
                    btnunlock = new GoodAndPetLockBtn("skin/8100226/newbutton/K157.png", 1, 6);
                    btnunlock.setBounds(80, 112, 19, 20);
                    this.add(btnunlock);
                }


                // 第一行第一个技能框
                this.labPetskills[0] = new JLabel();
                this.labPetskills[0].setBounds(158+sy, 60+sx, 50, 50);
                JLabel jLabel = new JLabel();
                jLabel.setBounds(158+sy, 60+sx, 50, 50);
                int[] arr = {158+sy, 60+sx};
                this.showPetSkills[0] = new ShowPetSkillsMouslisten(0, this, arr);
                this.labPetskills[0].addMouseListener(this.showPetSkills[0]);
                this.add(this.labPetskills[0]);

//            	// 第一行第一个技能框
//                labPetskills[0] = new JLabel();
//                labPetskills[0].setBounds(158+sy, 60+sx, 50, 50);
//                showPetSkills[0] = new ShowPetSkillsMouslisten(0);
//                labPetskills[0].addMouseListener(showPetSkills[0]);
//                this.add(labPetskills[0]);

                // 第二行第一个技能框1
                this.labPetskills[1] = new JLabel();
                this.labPetskills[1].setBounds(74+sy, 110+sx, 50, 50);
                jLabel = new JLabel();
                jLabel.setBounds(74+sy, 110+sx, 50, 50);
                arr = new int[]{74+sy, 110+sx};
                this.showPetSkills[1] = new ShowPetSkillsMouslisten(1, this, arr);
                this.labPetskills[1].addMouseListener(this.showPetSkills[1]);
                this.add(this.labPetskills[1]);

//                // 第二行第一个技能框
//                labPetskills[1] = new JLabel();
//                labPetskills[1].setBounds(74+sy, 110+sx, 50, 50);
//                showPetSkills[1] = new ShowPetSkillsMouslisten(1);
//                labPetskills[1].addMouseListener(showPetSkills[1]);
//                this.add(labPetskills[1]);

                // 第二行第二个技能框
                this.labPetskills[5] = new JLabel();
                this.labPetskills[5].setBounds(239+sy, 111+sx, 50, 50);
                arr = new int[]{239+sy, 111+sx};
                this.showPetSkills[5] = new ShowPetSkillsMouslisten(5, this, arr);
                this.labPetskills[5].addMouseListener(this.showPetSkills[5]);
                this.add(this.labPetskills[5]);

//                // 第二行第二个技能框
//                labPetskills[5] = new JLabel();
//                labPetskills[5].setBounds(239+sy, 111+sx, 50, 50);
//                showPetSkills[5] = new ShowPetSkillsMouslisten(5);
//                labPetskills[5].addMouseListener(showPetSkills[5]);
//                this.add(labPetskills[5]);


                // 第四行第一个技能框
                this.labPetskills[2] = new JLabel();
                this.labPetskills[2].setBounds(74+sy, 189+sx, 50, 50);
                arr = new int[]{74+sy, 189+sx};
                this.showPetSkills[2] = new ShowPetSkillsMouslisten(2, this, arr);
                this.labPetskills[2].addMouseListener(this.showPetSkills[2]);
                this.add(this.labPetskills[2]);

//                // 第四行第一个技能框
//                labPetskills[2] = new JLabel();
//                labPetskills[2].setBounds(74+sy, 189+sx, 50, 50);
//                showPetSkills[2] = new ShowPetSkillsMouslisten(2);
//                labPetskills[2].addMouseListener(showPetSkills[2]);
//                this.add(labPetskills[2]);


                // 第四行第二个技能框
                labPetskills[4] = new JLabel();
                labPetskills[4].setBounds(239+sy, 189+sx, 50, 50);
                arr = new int[]{239+sy, 189+sx};
                showPetSkills[4] = new ShowPetSkillsMouslisten(4, this, arr);
                labPetskills[4].addMouseListener(showPetSkills[4]);
                this.add(labPetskills[4]);

//                // 第四行第二个技能框
//                labPetskills[4] = new JLabel();
//                labPetskills[4].setBounds(239+sy, 189+sx, 50, 50);
//                showPetSkills[4] = new ShowPetSkillsMouslisten(4);
//                labPetskills[4].addMouseListener(showPetSkills[4]);
//                this.add(labPetskills[4]);


                // 第五行第一个技能框
                labPetskills[3] = new JLabel();
                labPetskills[3].setBounds(156+sy, 238+sx, 50, 50);//高清
                arr = new int[]{156+sy, 238+sx};
                showPetSkills[3] = new ShowPetSkillsMouslisten(3, this, arr);
                labPetskills[3].addMouseListener(showPetSkills[3]);
                this.add(labPetskills[3]);

//                // 第五行第一个技能框
//                labPetskills[3] = new JLabel();
//                labPetskills[3].setBounds(156+sy, 238+sx, 50, 50);
//                showPetSkills[3] = new ShowPetSkillsMouslisten(3);
//                labPetskills[3].addMouseListener(showPetSkills[3]);
//                this.add(labPetskills[3]);



                // 第三行第一个技能框
                labPetskills[6] = new JLabel();
                labPetskills[6].setBounds(157+sy, 149+sx, 50, 50);
                arr = new int[]{157+sy, 149+sx};
                showPetSkills[6] = new ShowPetSkillsMouslisten(6, this, arr);
                labPetskills[6].addMouseListener(showPetSkills[6]);
                this.add(labPetskills[6]);

//                // 第三行第一个技能框
//                labPetskills[6] = new JLabel();
//                labPetskills[6].setBounds(157+sy, 149+sx, 50, 50);
//                showPetSkills[6] = new ShowPetSkillsMouslisten(6);
//                labPetskills[6].addMouseListener(showPetSkills[6]);
//                this.add(labPetskills[6]);


//                // 第一行第一个技能框
//                labPetskills[0] = new JLabel();
//                labPetskills[0].setBounds(152, 65, 50, 50);
//                showPetSkills[0] = new ShowPetSkillsMouslisten(0);
//                labPetskills[0].addMouseListener(showPetSkills[0]);
//                this.add(labPetskills[0]);
//                // 第二行第一个技能框
//                labPetskills[1] = new JLabel();
//                labPetskills[1].setBounds(67, 115, 50, 50);
//                showPetSkills[1] = new ShowPetSkillsMouslisten(1);
//                labPetskills[1].addMouseListener(showPetSkills[1]);
//                this.add(labPetskills[1]);
//                // 第二行第二个技能框
//                labPetskills[5] = new JLabel();
//                labPetskills[5].setBounds(235, 115, 50, 50);
//                showPetSkills[5] = new ShowPetSkillsMouslisten(5);
//                labPetskills[5].addMouseListener(showPetSkills[5]);
//                this.add(labPetskills[5]);
//                // 第四行第一个技能框
//                labPetskills[2] = new JLabel();
//                labPetskills[2].setBounds(68, 195, 50, 50);
//                showPetSkills[2] = new ShowPetSkillsMouslisten(2);
//                labPetskills[2].addMouseListener(showPetSkills[2]);
//                this.add(labPetskills[2]);
//                // 第四行第二个技能框
//                labPetskills[4] = new JLabel();
//                labPetskills[4].setBounds(235, 195, 50, 50);
//                showPetSkills[4] = new ShowPetSkillsMouslisten(4);
//                labPetskills[4].addMouseListener(showPetSkills[4]);
//                this.add(labPetskills[4]);
//                // 第五行第一个技能框
//                labPetskills[3] = new JLabel();
//                labPetskills[3].setBounds(153, 243, 50, 50);
//                showPetSkills[3] = new ShowPetSkillsMouslisten(3);
//                labPetskills[3].addMouseListener(showPetSkills[3]);
//                this.add(labPetskills[3]);
//                // 第三行第一个技能框
//                labPetskills[6] = new JLabel();
//                labPetskills[6].setBounds(153, 155, 50, 50);
//                showPetSkills[6] = new ShowPetSkillsMouslisten(6);
//                labPetskills[6].addMouseListener(showPetSkills[6]);
//                this.add(labPetskills[6]);
            }else{
                if(configure7.getLyssx().equals("开")){
                    // 召唤兽加锁按钮
                    btnlock = new GoodAndPetLockBtn("skin/8100226/newbutton/K156.png", 1, 5);
                    btnlock.setBounds(60, 112, 19, 20);
                    this.add(btnlock);

                    // 召唤兽加锁按钮
                    btnunlock = new GoodAndPetLockBtn("skin/8100226/newbutton/K157.png", 1, 6);
                    btnunlock.setBounds(80, 112, 19, 20);
                    this.add(btnunlock);
                }

                // 第一行第一个技能框
                this.labPetskills[0] = new JLabel();
                this.labPetskills[0].setBounds(158, 142, 50, 50);
                JLabel jLabel = new JLabel();
                jLabel.setBounds(158, 142, 50, 50);
                int[] arr = {158, 142};
                this.showPetSkills[0] = new ShowPetSkillsMouslisten(0, this, arr);
                this.labPetskills[0].addMouseListener(this.showPetSkills[0]);
                this.add(this.labPetskills[0]);

                // 第二行第一个技能框1
                this.labPetskills[1] = new JLabel();
                this.labPetskills[1].setBounds(90, 185, 50, 50);
                jLabel = new JLabel();
                jLabel.setBounds(90, 185, 50, 50);
                arr = new int[]{90, 185};
                this.showPetSkills[1] = new ShowPetSkillsMouslisten(1, this, arr);
                this.labPetskills[1].addMouseListener(this.showPetSkills[1]);
                this.add(this.labPetskills[1]);

                // 第四行第二个技能框2
                this.labPetskills[5] = new JLabel();
                this.labPetskills[5].setBounds(228, 317, 50, 50);
                arr = new int[]{228, 317};
                this.showPetSkills[5] = new ShowPetSkillsMouslisten(5, this, arr);
                this.labPetskills[5].addMouseListener(this.showPetSkills[5]);
                this.add(this.labPetskills[5]);

                // 第三行第一个技能框
                this.labPetskills[2] = new JLabel();
                this.labPetskills[2].setBounds(60, 251, 50, 50);
                arr = new int[]{60, 251};
                this.showPetSkills[2] = new ShowPetSkillsMouslisten(2, this, arr);
                this.labPetskills[2].addMouseListener(this.showPetSkills[2]);
                this.add(this.labPetskills[2]);

                // 第五行第一个技能框676
                labPetskills[4] = new JLabel();
                labPetskills[4].setBounds(159, 361, 50, 50);
                arr = new int[]{159, 361};
                showPetSkills[4] = new ShowPetSkillsMouslisten(4, this, arr);
                labPetskills[4].addMouseListener(showPetSkills[4]);
                this.add(labPetskills[4]);
                // 第四行第一个技能框
                labPetskills[3] = new JLabel();
                labPetskills[3].setBounds(90, 317, 50, 50);//高清
                arr = new int[]{90, 317};
                showPetSkills[3] = new ShowPetSkillsMouslisten(3, this, arr);
                labPetskills[3].addMouseListener(showPetSkills[3]);
                this.add(labPetskills[3]);
                // 第三行第二个技能框神兽技能
                labPetskills[8] = new JLabel();
                labPetskills[8].setBounds(159, 251, 50, 50);
                arr = new int[]{159, 251};
                showPetSkills[8] = new ShowPetSkillsMouslisten(8, this, arr);
                labPetskills[8].addMouseListener(showPetSkills[8]);
                this.add(labPetskills[8]);

                // 第二行第二个技能框8
                labPetskills[7] = new JLabel();
                labPetskills[7].setBounds(228, 185, 50, 50); //木人
                arr = new int[]{228, 185};
                showPetSkills[7] = new ShowPetSkillsMouslisten(7, this, arr);
                labPetskills[7].addMouseListener(showPetSkills[7]);
                this.add(labPetskills[7]);

                // 第三行第三个技能框7
                labPetskills[6] = new JLabel();
                labPetskills[6].setBounds(258, 251, 50, 50);
                arr = new int[]{258, 251};
                showPetSkills[6] = new ShowPetSkillsMouslisten(6, this, arr);
                labPetskills[6].addMouseListener(showPetSkills[6]);
                this.add(labPetskills[6]);

                //启灵技能
//            	this.add(labPetskills[6]);
                this.qlPetskills[0] = new JLabel();
                this.qlPetskills[0].setBounds(88, 450, 50, 50);
                arr = new int[]{88, 450};
                this.showQlPetSkills[0] = new ShowPetSkillsMouslisten(0, this, arr);
                this.qlPetskills[0].addMouseListener(this.showQlPetSkills[0]);
//            	this.add(this.qlPetskills[0]);
                this.qlPetskills[1] = new JLabel();
                this.qlPetskills[1].setBounds(155, 450, 50, 50);
                arr = new int[]{155, 450};
                this.showQlPetSkills[1] = new ShowPetSkillsMouslisten(1, this, arr);
                this.qlPetskills[1].addMouseListener(this.showQlPetSkills[1]);
//            	this.add(this.qlPetskills[1]);
                this.qlPetskills[2] = new JLabel();
                this.qlPetskills[2].setBounds(224, 450, 50, 50);
                arr = new int[]{224, 450};
                this.showQlPetSkills[2] = new ShowPetSkillsMouslisten(2, this, arr);
                this.qlPetskills[2].addMouseListener(this.showQlPetSkills[2]);
//            	this.add(this.qlPetskills[2]);
                this.qlPetskills[3] = new JLabel();
                this.qlPetskills[3].setBounds(319, 450, 50, 50);
                arr = new int[]{319, 450};
                this.showQlPetSkills[3] = new ShowPetSkillsMouslisten(3, this, arr);
                this.qlPetskills[3].addMouseListener(this.showQlPetSkills[3]);
//            	this.add(this.qlPetskills[3]);
                this.qlPetskills[4] = new JLabel();
                this.qlPetskills[4].setBounds(388, 450, 50, 50);
                arr = new int[]{388, 450};
                this.showQlPetSkills[4] = new ShowPetSkillsMouslisten(4, this, arr);
                this.qlPetskills[4].addMouseListener(this.showQlPetSkills[4]);
//            	this.add(this.qlPetskills[4]);
                this.qlPetskills[5] = new JLabel();
                this.qlPetskills[5].setBounds(456, 450, 50, 50);
                arr = new int[]{456, 450};
                this.showQlPetSkills[5] = new ShowPetSkillsMouslisten(5, this, arr);
                this.qlPetskills[5].addMouseListener(this.showQlPetSkills[5]);
//            	this.add(this.qlPetskills[5]);
            }
        }else {//旧版排版界面
            icon = new ImageIcon("inkImg/old/background/S65fuben.png");
            if(configure.getZhsjngs()!=null) {
                skllNum = Integer.parseInt(configure.getZhsjngs());
                if(skllNum == 7) {
                    icon = new ImageIcon("inkImg/old/background/S297.png");
                }
                if(skllNum == 5) {
                    icon = new ImageIcon("inkImg/old/background/S653Z.png");
                }
                labPetskills = new JLabel[skllNum];// 召唤兽的九个技能框
                showPetSkills = new ShowPetSkillsMouslisten[skllNum];// 召唤兽的九个技能框
            }

            add(effect);
            box = new RichLabel();
            if(skllNum == 7 || skllNum == 5) {
                if(skllNum == 7) {
                    this.setPreferredSize(new Dimension(561, 450));
                }else {
                    this.setPreferredSize(new Dimension(492, 345));
                }
            }else {
                this.setPreferredSize(new Dimension(492, 440));
            }

            this.setLayout(null);
            this.setBackground(UIUtils.Color_BACK);
            // 关闭按钮事件
            FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/old/2/1.png", 1, 18);
            if(skllNum == 7 || skllNum == 5) {
                if(skllNum == 7){
                    offBtn.setBounds(561 - 25, 0, 25, 25);
                }else {
                    offBtn.setBounds(492 - 25, 0, 25, 25);
                }
            }else {
                offBtn.setBounds(492 - 25, 0, 25, 25);
            }
            this.add(offBtn);

            // 天生技能列表对象
            modelNaturalskill = new DefaultListModel<String>();
            // 天生技能列表
            listNaturalskill = new JList<String>() {
                {
                    setOpaque(false);
                } // instance initializer
            };
            listNaturalskill.setSelectionBackground(new Color(33, 42, 52));
            listNaturalskill.setSelectionForeground(Color.YELLOW);
            listNaturalskill.setForeground(Color.YELLOW);
            listNaturalskill.setFont(new Font("微软雅黑", 1, 14));
            listNaturalskill.setBackground(UIUtils.Color_BACK); // 设置列表框为透明背景
            listNaturalskill.setModel(modelNaturalskill);
            listNaturalskill.addMouseListener(new MouseListener() {
                @Override
                public void mouseReleased(MouseEvent e) {
                    // TODO Auto-generated method stub

                }

                @Override
                public void mousePressed(MouseEvent e) {

                }

                @Override
                public void mouseExited(MouseEvent e) {
                    // TODO Auto-generated method stub
                    MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
                }

                @Override
                public void mouseEntered(MouseEvent e) {
                    // TODO Auto-generated method stub
                    MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
                }
                @Override
                public void mouseClicked(MouseEvent e) {
                    if (listNaturalskill.getSelectedValue() != null) {
                        String skillname = listNaturalskill.getSelectedValue();
                        // 获得该召唤兽技能
                        Skill skill = UserMessUntil.getskill1(skillname);
                        // 先判断这个表格是否有召唤兽技能信息
                        if (skill != null) {// 有召唤兽技能
                            PetSkillsJframe.getPetSkillsJframe().getPetSkillsJpanel().skillmsg(skill,0);
                            if("200193".equals(UserMessUntil.getChosePetMes().getSummoningid())&&skill.getSkillid().equals("25000")){
                                FormsManagement.showForm(688);
                            }
                        } else {
                            PetSkillsJframe.getPetSkillsJframe().getPetSkillsJpanel().getBox().setText(null);
                        }
                    }
                }
            });
//            if(skllNum == 7 || skllNum == 5) {
//                if(skllNum == 5) {
//                    // 天生技能列表滚动条
//                    jScrollPane1 = new JScrollPane(listNaturalskill);
//                    jScrollPane1.setVerticalScrollBarPolicy(22);
//                    jScrollPane1.getVerticalScrollBar().setUI(new SrcollPanelUI());
//                    jScrollPane1.getViewport().setOpaque(false);
//                    jScrollPane1.setOpaque(false);
//                    jScrollPane1.setBounds(320, 53, 145, 89);
//                    jScrollPane1.setBorder(BorderFactory.createEmptyBorder());
//                    jScrollPane1.setHorizontalScrollBarPolicy(31);
//                    this.add(jScrollPane1);
//                }else if(skllNum == 7) {
//                    if(showPetSkillsTS.length>0) {
//                        for(int i=0;i<showPetSkillsTS.length;i++) {
//                            labPetskillsTS[i] = new JLabel();
//                            labPetskillsTS[i].setBounds(237+i*15+i*50-showPetSkillsTS.length*5, 53, 50, 50);
//                            showPetSkillsTS[i] = new ShowPetSkillsMouslisten(i);
//                            labPetskillsTS[i].addMouseListener(showPetSkillsTS[i]);
//                            this.add(labPetskillsTS[i]);
//                        }
//                    }
//
//                }
//            }else {
//                // 天生技能列表滚动条
//                jScrollPane1 = new JScrollPane(listNaturalskill);
//                jScrollPane1.setVerticalScrollBarPolicy(22);
//                jScrollPane1.getVerticalScrollBar().setUI(new SrcollPanelUI());
//                jScrollPane1.getViewport().setOpaque(false);
//                jScrollPane1.setOpaque(false);
//                jScrollPane1.setBounds(320, 53, 145, 89);
//                jScrollPane1.setBorder(BorderFactory.createEmptyBorder());
//                jScrollPane1.setHorizontalScrollBarPolicy(31);
//                this.add(jScrollPane1);
//            }
            // 后面学习的技能列表滚动条
            if(skllNum == 7) {
                jScrollPane2 = new JScrollPane(box);
                jScrollPane2.setVerticalScrollBarPolicy(22);
                jScrollPane2.getVerticalScrollBar().setUI(new SrcollPanelUI());
                jScrollPane2.getVerticalScrollBar().setUnitIncrement(30);
                jScrollPane2.getViewport().setOpaque(false);
                jScrollPane2.setOpaque(false);
                jScrollPane2.setBounds(320, 147, 205, 273);
                jScrollPane2.setBorder(BorderFactory.createEmptyBorder());
                jScrollPane2.setHorizontalScrollBarPolicy(31);
                this.add(jScrollPane2);
            }else {
                jScrollPane2 = new JScrollPane(box);
                jScrollPane2.setVerticalScrollBarPolicy(22);
                jScrollPane2.getVerticalScrollBar().setUI(new SrcollPanelUI());
                jScrollPane2.getVerticalScrollBar().setUnitIncrement(30);
                jScrollPane2.getViewport().setOpaque(false);
                jScrollPane2.setOpaque(false);
                jScrollPane2.setBounds(320, 147, 145, 173);
                jScrollPane2.setBorder(BorderFactory.createEmptyBorder());
                jScrollPane2.setHorizontalScrollBarPolicy(31);
                this.add(jScrollPane2);
            }

            if(skllNum == 7 || skllNum == 5) {
                if(skllNum == 7) {
                    int sx = 103;
                    // 支援列表
                    supportListBtn = new DeleteSkillBtn("inkImg/hongmu/a7.png", 1, "支援列表");
                    supportListBtn.setBounds(63, 298+sx, 68, 17);
                    this.add(supportListBtn);

                    // 删除技能
                    deleteSkillBtn = new DeleteSkillBtn("inkImg/hongmu/a7.png", 1, "删除技能");
                    deleteSkillBtn.setBounds(230, 298+sx, 68, 17);
                    this.add(deleteSkillBtn);
                }else {
                    // 支援列表
                    supportListBtn = new DeleteSkillBtn("inkImg/hongmu/a7.png", 1, "支援列表");
                    supportListBtn.setBounds(63, 298, 68, 17);
                    this.add(supportListBtn);

                    // 删除技能
                    deleteSkillBtn = new DeleteSkillBtn("inkImg/hongmu/a7.png", 1, "删除技能");
                    deleteSkillBtn.setBounds(230, 298, 68, 17);
                    this.add(deleteSkillBtn);
                }
            }else {
                // 支援列表
                supportListBtn = new DeleteSkillBtn("inkImg/hongmu/a7.png", 1, "支援列表");
                supportListBtn.setBounds(63, 298, 68, 17);
                this.add(supportListBtn);

                // 删除技能
                deleteSkillBtn = new DeleteSkillBtn("inkImg/hongmu/a7.png", 1, "删除技能");
                deleteSkillBtn.setBounds(230, 298, 68, 17);
                this.add(deleteSkillBtn);
//                deleteQlSkillBtn = new DeleteSkillBtn("skin/8100226/button/49.png", 1, "删除启灵");
//                deleteQlSkillBtn.setBounds(370, 330, 68, 17);
//                this.add(this.deleteQlSkillBtn);
            }
            if(skllNum == 5) {
                // 第一行第一个技能框
                labPetskills[0] = new JLabel();
                labPetskills[0].setBounds(152, 65, 50, 50);
                showPetSkills[0] = new ShowPetSkillsMouslisten(0);
                labPetskills[0].addMouseListener(showPetSkills[0]);
                this.add(labPetskills[0]);
                // 第二行第一个技能框
                labPetskills[1] = new JLabel();
                labPetskills[1].setBounds(69, 153, 50, 50);
                showPetSkills[1] = new ShowPetSkillsMouslisten(1);
                labPetskills[1].addMouseListener(showPetSkills[1]);
                this.add(labPetskills[1]);

                // 第四行第一个技能框
                labPetskills[2] = new JLabel();
                labPetskills[2].setBounds(235, 153, 50, 50);
                showPetSkills[2] = new ShowPetSkillsMouslisten(2);
                labPetskills[2].addMouseListener(showPetSkills[2]);
                this.add(labPetskills[2]);
                // 第四行第二个技能框
                labPetskills[4] = new JLabel();
                labPetskills[4].setBounds(152, 154, 50, 50);
                showPetSkills[4] = new ShowPetSkillsMouslisten(4);
                labPetskills[4].addMouseListener(showPetSkills[4]);
                this.add(labPetskills[4]);
                // 第五行第一个技能框
                labPetskills[3] = new JLabel();
                labPetskills[3].setBounds(152, 243, 50, 50);
                showPetSkills[3] = new ShowPetSkillsMouslisten(3);
                labPetskills[3].addMouseListener(showPetSkills[3]);
                this.add(labPetskills[3]);


            }else if(skllNum == 7) {
                int sx = 103;
                int sy = -2;
                // 第一行第一个技能框
                labPetskills[0] = new JLabel();
                labPetskills[0].setBounds(152+sy, 63+sx, 50, 50);
                showPetSkills[0] = new ShowPetSkillsMouslisten(0);
                labPetskills[0].addMouseListener(showPetSkills[0]);
                this.add(labPetskills[0]);

                // 第二行第一个技能框
                labPetskills[1] = new JLabel();
                labPetskills[1].setBounds(69+sy, 114+sx, 50, 50);
                showPetSkills[1] = new ShowPetSkillsMouslisten(1);
                labPetskills[1].addMouseListener(showPetSkills[1]);
                this.add(labPetskills[1]);
                // 第二行第二个技能框
                labPetskills[5] = new JLabel();
                labPetskills[5].setBounds(235+sy, 115+sx, 50, 50);
                showPetSkills[5] = new ShowPetSkillsMouslisten(5);
                labPetskills[5].addMouseListener(showPetSkills[5]);
                this.add(labPetskills[5]);
                // 第四行第一个技能框
                labPetskills[2] = new JLabel();
                labPetskills[2].setBounds(69+sy, 193+sx, 50, 50);
                showPetSkills[2] = new ShowPetSkillsMouslisten(2);
                labPetskills[2].addMouseListener(showPetSkills[2]);
                this.add(labPetskills[2]);
                // 第四行第二个技能框
                labPetskills[4] = new JLabel();
                labPetskills[4].setBounds(234+sy, 193+sx, 50, 50);
                showPetSkills[4] = new ShowPetSkillsMouslisten(4);
                labPetskills[4].addMouseListener(showPetSkills[4]);
                this.add(labPetskills[4]);
                // 第五行第一个技能框
                labPetskills[3] = new JLabel();
                labPetskills[3].setBounds(150+sy, 242+sx, 50, 50);
                showPetSkills[3] = new ShowPetSkillsMouslisten(3);
                labPetskills[3].addMouseListener(showPetSkills[3]);
                this.add(labPetskills[3]);
                // 第三行第一个技能框
                labPetskills[6] = new JLabel();
                labPetskills[6].setBounds(153+sy, 155+sx, 50, 50);
                showPetSkills[6] = new ShowPetSkillsMouslisten(6);
                labPetskills[6].addMouseListener(showPetSkills[6]);
                this.add(labPetskills[6]);
//                // 第一行第一个技能框
//                labPetskills[0] = new JLabel();
//                labPetskills[0].setBounds(152, 65, 50, 50);
//                showPetSkills[0] = new ShowPetSkillsMouslisten(0);
//                labPetskills[0].addMouseListener(showPetSkills[0]);
//                this.add(labPetskills[0]);
//                // 第二行第一个技能框
//                labPetskills[1] = new JLabel();
//                labPetskills[1].setBounds(67, 115, 50, 50);
//                showPetSkills[1] = new ShowPetSkillsMouslisten(1);
//                labPetskills[1].addMouseListener(showPetSkills[1]);
//                this.add(labPetskills[1]);
//                // 第二行第二个技能框
//                labPetskills[5] = new JLabel();
//                labPetskills[5].setBounds(235, 115, 50, 50);
//                showPetSkills[5] = new ShowPetSkillsMouslisten(5);
//                labPetskills[5].addMouseListener(showPetSkills[5]);
//                this.add(labPetskills[5]);
//                // 第四行第一个技能框
//                labPetskills[2] = new JLabel();
//                labPetskills[2].setBounds(68, 195, 50, 50);
//                showPetSkills[2] = new ShowPetSkillsMouslisten(2);
//                labPetskills[2].addMouseListener(showPetSkills[2]);
//                this.add(labPetskills[2]);
//                // 第四行第二个技能框
//                labPetskills[4] = new JLabel();
//                labPetskills[4].setBounds(235, 195, 50, 50);
//                showPetSkills[4] = new ShowPetSkillsMouslisten(4);
//                labPetskills[4].addMouseListener(showPetSkills[4]);
//                this.add(labPetskills[4]);
//                // 第五行第一个技能框
//                labPetskills[3] = new JLabel();
//                labPetskills[3].setBounds(153, 243, 50, 50);
//                showPetSkills[3] = new ShowPetSkillsMouslisten(3);
//                labPetskills[3].addMouseListener(showPetSkills[3]);
//                this.add(labPetskills[3]);
//                // 第三行第一个技能框
//                labPetskills[6] = new JLabel();
//                labPetskills[6].setBounds(153, 155, 50, 50);
//                showPetSkills[6] = new ShowPetSkillsMouslisten(6);
//                labPetskills[6].addMouseListener(showPetSkills[6]);
//                this.add(labPetskills[6]);
            }else{
                // 第一行第一个技能框
                this.labPetskills[0] = new JLabel();
                this.labPetskills[0].setBounds(156, 43, 50, 50);
                JLabel jLabel = new JLabel();
                jLabel.setBounds(156, 43, 50, 50);
                int[] arr = {156, 43};
                this.showPetSkills[0] = new ShowPetSkillsMouslisten(0, this, arr);
                this.labPetskills[0].addMouseListener(this.showPetSkills[0]);
                this.add(this.labPetskills[0]);

                // 第二行第一个技能框1
                this.labPetskills[1] = new JLabel();
                this.labPetskills[1].setBounds(87, 86, 50, 50);
                jLabel = new JLabel();
                jLabel.setBounds(87, 86, 50, 50);
                arr = new int[]{87, 86};
                this.showPetSkills[1] = new ShowPetSkillsMouslisten(1, this, arr);
                this.labPetskills[1].addMouseListener(this.showPetSkills[1]);
                this.add(this.labPetskills[1]);
                // 第四行第二个技能框2
                this.labPetskills[5] = new JLabel();
                this.labPetskills[5].setBounds(225, 218, 50, 50);
                arr = new int[]{225, 218};
                this.showPetSkills[5] = new ShowPetSkillsMouslisten(5, this, arr);
                this.labPetskills[5].addMouseListener(this.showPetSkills[5]);
                this.add(this.labPetskills[5]);
                // 第三行第一个技能框
                this.labPetskills[2] = new JLabel();
                this.labPetskills[2].setBounds(57, 153, 50, 50);
                arr = new int[]{57, 153};
                this.showPetSkills[2] = new ShowPetSkillsMouslisten(2, this, arr);
                this.labPetskills[2].addMouseListener(this.showPetSkills[2]);
                this.add(this.labPetskills[2]);
                // 第五行第一个技能框676
                labPetskills[4] = new JLabel();
                labPetskills[4].setBounds(156, 262, 50, 50);
                arr = new int[]{156, 262};
                showPetSkills[4] = new ShowPetSkillsMouslisten(4, this, arr);
                labPetskills[4].addMouseListener(showPetSkills[4]);
                this.add(labPetskills[4]);
                // 第四行第一个技能框
                labPetskills[3] = new JLabel();
                labPetskills[3].setBounds(88, 218, 50, 50);//高清
                arr = new int[]{88, 218};
                showPetSkills[3] = new ShowPetSkillsMouslisten(3, this, arr);
                labPetskills[3].addMouseListener(showPetSkills[3]);
                this.add(labPetskills[3]);
                // 第三行第二个技能框神兽技能
                labPetskills[8] = new JLabel();
                labPetskills[8].setBounds(157, 154, 50, 50);
                arr = new int[]{157, 154};
                showPetSkills[8] = new ShowPetSkillsMouslisten(8, this, arr);
                labPetskills[8].addMouseListener(showPetSkills[8]);
                this.add(labPetskills[8]);
                // 第二行第二个技能框8
                labPetskills[7] = new JLabel();
                labPetskills[7].setBounds(225, 87, 50, 50); //木人
                arr = new int[]{225, 87};
                showPetSkills[7] = new ShowPetSkillsMouslisten(7, this, arr);
                labPetskills[7].addMouseListener(showPetSkills[7]);
                this.add(labPetskills[7]);
                // 第一行第二个技能框7
                labPetskills[6] = new JLabel();
                labPetskills[6].setBounds(255, 153, 50, 50);
                arr = new int[]{255, 153};
                showPetSkills[6] = new ShowPetSkillsMouslisten(6, this, arr);
                labPetskills[6].addMouseListener(showPetSkills[6]);
                //启灵技能
                this.add(labPetskills[6]);
                this.qlPetskills[0] = new JLabel();
                this.qlPetskills[0].setBounds(56, 360, 50, 50);
                arr = new int[]{56, 360};
                this.showQlPetSkills[0] = new ShowPetSkillsMouslisten(0, this, arr);
                this.qlPetskills[0].addMouseListener(this.showQlPetSkills[0]);
//                this.add(this.qlPetskills[0]);
                this.qlPetskills[1] = new JLabel();
                this.qlPetskills[1].setBounds(124, 360, 50, 50);
                arr = new int[]{124, 360};
                this.showQlPetSkills[1] = new ShowPetSkillsMouslisten(1, this, arr);
                this.qlPetskills[1].addMouseListener(this.showQlPetSkills[1]);
//                this.add(this.qlPetskills[1]);
                this.qlPetskills[2] = new JLabel();
                this.qlPetskills[2].setBounds(190, 361, 50, 50);
                arr = new int[]{190, 361};
                this.showQlPetSkills[2] = new ShowPetSkillsMouslisten(2, this, arr);
                this.qlPetskills[2].addMouseListener(this.showQlPetSkills[2]);
//                this.add(this.qlPetskills[2]);
                this.qlPetskills[3] = new JLabel();
                this.qlPetskills[3].setBounds(264, 359, 50, 50);
                arr = new int[]{264, 359};
                this.showQlPetSkills[3] = new ShowPetSkillsMouslisten(3, this, arr);
                this.qlPetskills[3].addMouseListener(this.showQlPetSkills[3]);
//                this.add(this.qlPetskills[3]);
                this.qlPetskills[4] = new JLabel();
                this.qlPetskills[4].setBounds(333, 359, 50, 50);
                arr = new int[]{333, 359};
                this.showQlPetSkills[4] = new ShowPetSkillsMouslisten(4, this, arr);
                this.qlPetskills[4].addMouseListener(this.showQlPetSkills[4]);
//                this.add(this.qlPetskills[4]);
                this.qlPetskills[5] = new JLabel();
                this.qlPetskills[5].setBounds(401, 359, 50, 50);
                arr = new int[]{401, 359};
                this.showQlPetSkills[5] = new ShowPetSkillsMouslisten(5, this, arr);
                this.qlPetskills[5].addMouseListener(this.showQlPetSkills[5]);
//                this.add(this.qlPetskills[5]);
            }
            // 召唤兽加锁按钮
            btnlock = new GoodAndPetLockBtn("skin/8100226/button/56.png", 1, 5);
            btnlock.setBounds(135, 170, 19, 20);
            this.add(btnlock);

            // 召唤兽加锁按钮
            btnunlock = new GoodAndPetLockBtn("skin/8100226/button/57.png", 1, 6);
            btnunlock.setBounds(210, 170, 19, 20);
            this.add(btnunlock);
        }

    }
    /**天生技能展示*/
    public void addNaturalSkills(RoleSummoning pet) {
        deleteNaturalSkills();
        if (pet != null) {
            String[] skills = pet.getSkill().split("\\|");
            int length = skills != null ? skills.length : 0;
            // 是否是葫芦娃  葫芦娃增加一个技能按钮
            boolean is = Arrays.asList("754", "755", "756", "757", "758", "759", "760").contains(pet.getSummoningid());
            if (is) {
                length++;
            }
            if (length>0) {
                naturalSkills = new JLabel[length];
                int x = 280 - 52 * naturalSkills.length / 2, y = 51;
                for (int i = 0; i < length; i++) {
                    naturalSkills[i] = new JLabel();
                    naturalSkills[i].setBounds(x,y,50,50);
                    // 新天生技能图片
                    ImageIcon img1;
                    RoleSummoning temPet = null;
                    Skill skill = null;
                    if (i >= skills.length) {
                        temPet = pet;
                        img1 = new ImageIcon("img/878D5747.png");
                    } else {
                        img1 = new ImageIcon("inkImg/old/skill/wxs_" +skills[i] + ".png");
                        skill = UserMessUntil.getSkillBean().getSkillMap().get(skills[i]);
                    }
                    img1.setImage(img1.getImage().getScaledInstance(50, 50, 10));
                    naturalSkills[i].setIcon(img1);
                    naturalSkills[i].addMouseListener(getNaturalMouseListener(skill, temPet));
                    this.add(naturalSkills[i]);
                    x += 60;
                }
            }
        }
    }
    public void deleteNaturalSkills() {// 新天生技能
        if (naturalSkills != null) {
            for (JLabel naturalSkill : naturalSkills) {
                this.remove(naturalSkill);
            }
        }
        naturalSkills = null;
        effect.setVisible(false);
        PetSkillsJframe.getPetSkillsJframe().getPetSkillsJpanel().getBox().setText(null);
    }

    public MouseListener getNaturalMouseListener(Skill skill,RoleSummoning pet) {
        return new MouseListener() {
            @Override
            public void mouseReleased(MouseEvent e) {
                // TODO Auto-generated method stub

            }



            @Override
            public void mousePressed(MouseEvent e) {

            }

            @Override
            public void mouseExited(MouseEvent e) {
                // TODO Auto-generated method stub
                MessagrFlagUntil.setMouse( MessagrFlagUntil.MOUSE12 );
            }

            @Override
            public void mouseEntered(MouseEvent e) {
                // TODO Auto-generated method stub
                MessagrFlagUntil.setMouse( MessagrFlagUntil.MOUSE1 );
            }

            @Override
            public void mouseClicked(MouseEvent e) {
                if (pet != null) {
                    HuaLianJframe.getHuaLianJframe().getHuaLianJpanel().updatePet(pet);
                    FormsManagement.showForm(701);
                } else if (skill != null) {// 有召唤兽技能
                    PetSkillsJframe.getPetSkillsJframe().getPetSkillsJpanel().skillmsg(skill, 0);
                    /*兑换版本心猿*/
                    if ("200193".equals(UserMessUntil.getChosePetMes().getSummoningid()) && "25000".equals(skill.getSkillid())) {
                        FormsManagement.showForm(688);
                    }
                    /*心路版本心猿屏蔽中*/
                    if (XYJframe.getXYJframe().getXyJpanel().isVisible()&& "一念成圣".equals(skill.getSkillname())){
                        RoleSummoning pet = UserMessUntil.getChosePetMes();
                        if (!"728".equals(pet.getSummoningskin())) {
                            SendMessageUntil.toServer(Agreement.getAgreement().rolechangeAgreement("OPEN"+"&"+pet.getSid()));
                        }
                    }
                } else {
                    PetSkillsJframe.getPetSkillsJframe().getPetSkillsJpanel().getBox().setText(null);
                }

            }
        };
    }
    //    private final ImageIcon icon = new ImageIcon("inkImg/hongmu/2/34_png.xy2uiimg.wxs_bg.png");
//    private final ImageIcon icon = new ImageIcon("inkImg/hongmu/2/petskll_bg.png");
    //private final ImageIcon imageIcon2 = new ImageIcon("inkImg/hongmu/2/41_png.xy2uiimg.wxs_border.png");
    private final ImageIcon icon2 = new ImageIcon("inkImg/background/S294.png");//展示天生技能边框
    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);

        ConfigureBean allConfigure = UserMessUntil.getConfigureBean();
        Map<BigDecimal, Configure> item = allConfigure.getAllConfigure();
        Configure configure7 = item.get(new BigDecimal(7));
        if(configure7.getZhsjngs().equals("新")) {

            if(skllNum == 7 || skllNum == 5) {
                if(skllNum == 7) {
                    g.drawImage(icon.getImage(), 0, 0, 570, 445, this);
                    if (UserMessUntil.getChosePetMes().getSkill() != null && !UserMessUntil.getChosePetMes().getSkill().equals("")) {
                        for (JLabel naturalSkill : naturalSkills) {
                            g.drawImage(icon2.getImage(), naturalSkill.getX() - 3, naturalSkill.getY() - 2, this);
                        }
                    }
                    if(showPetSkills!=null && showPetSkills.length>0){
                        for(int i=0;i<showPetSkills.length;i++) {
                            if(UserMessUntil.getChosePetMes().getPetSkilllock()!=null) {
                                String[] list = UserMessUntil.getChosePetMes().getPetSkilllock().split("\\|");
                                for(String sd:list) {
                                    if(showPetSkills[i].getSkill()!=null && sd.equals(showPetSkills[i].getSkill().getSkillid())) {
                                        if(i==0) {
                                            g.drawImage(licon.getImage(), 187,148, 16,18, this);
                                        }
                                        if(i==1) {
                                            g.drawImage(licon.getImage(), 105,198, 16,18, this);
                                        }
                                        if(i==2) {
                                            g.drawImage(licon.getImage(), 105,278, 16,18, this);
                                        }
                                        if(i==3) {
                                            g.drawImage(licon.getImage(), 187,325, 16,18, this);
                                        }
                                        if(i==4) {
                                            g.drawImage(licon.getImage(), 270,278, 16,18, this);
                                        }
                                        if(i==5) {
                                            g.drawImage(licon.getImage(), 270,198, 16,18, this);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }else {
                    g.drawImage(icon.getImage(), 0, 0, 570, 445, this);
                    if (UserMessUntil.getChosePetMes().getSkill() != null && !UserMessUntil.getChosePetMes().getSkill().equals("")) {
                        for (JLabel naturalSkill : naturalSkills) {
                            g.drawImage(icon2.getImage(), naturalSkill.getX() - 3, naturalSkill.getY() - 2, this);
                        }
                    }

                }
            }else {
                g.drawImage(icon.getImage(), 0, 0, 570, 447, this);
                if (UserMessUntil.getChosePetMes().getSkill() != null && !UserMessUntil.getChosePetMes().getSkill().equals("")) {
                    for (JLabel naturalSkill : naturalSkills) {
                        g.drawImage(icon2.getImage(), naturalSkill.getX() - 3, naturalSkill.getY() - 2, this);
                    }
                }
            }
        }else {

            if(skllNum == 7 || skllNum == 5) {
                if(skllNum == 7) {
                    g.drawImage(icon.getImage(), 0, 0, 561, 450, this);
                    if (UserMessUntil.getChosePetMes().getSkill() != null && !UserMessUntil.getChosePetMes().getSkill().equals("")) {
                        for (JLabel naturalSkill : naturalSkills) {
                            g.drawImage(icon2.getImage(), naturalSkill.getX() - 3, naturalSkill.getY() - 2, this);
                        }
                    }
                    if(showPetSkills!=null && showPetSkills.length>0){
                        for(int i=0;i<showPetSkills.length;i++) {
                            if(UserMessUntil.getChosePetMes().getPetSkilllock()!=null) {
                                String[] list = UserMessUntil.getChosePetMes().getPetSkilllock().split("\\|");
                                for(String sd:list) {
                                    if(showPetSkills[i].getSkill()!=null && sd.equals(showPetSkills[i].getSkill().getSkillid())) {
                                        if(i==0) {
                                            g.drawImage(licon.getImage(), 187,148, 16,18, this);
                                        }
                                        if(i==1) {
                                            g.drawImage(licon.getImage(), 105,198, 16,18, this);
                                        }
                                        if(i==2) {
                                            g.drawImage(licon.getImage(), 105,278, 16,18, this);
                                        }
                                        if(i==3) {
                                            g.drawImage(licon.getImage(), 187,325, 16,18, this);
                                        }
                                        if(i==4) {
                                            g.drawImage(licon.getImage(), 270,278, 16,18, this);
                                        }
                                        if(i==5) {
                                            g.drawImage(licon.getImage(), 270,198, 16,18, this);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }else {
                    g.drawImage(icon.getImage(), 0, 0, 492, 345, this);
                    if (UserMessUntil.getChosePetMes().getSkill() != null && !UserMessUntil.getChosePetMes().getSkill().equals("")) {
                        for (JLabel naturalSkill : naturalSkills) {
                            g.drawImage(icon2.getImage(), naturalSkill.getX() - 3, naturalSkill.getY() - 2, this);
                        }
                    }

                }
            }else {
                g.drawImage(icon.getImage(), 0, 0, 492, 440, this);
                if (UserMessUntil.getChosePetMes().getSkill() != null && !UserMessUntil.getChosePetMes().getSkill().equals("")) {
                    for (JLabel naturalSkill : naturalSkills) {
                        g.drawImage(icon2.getImage(), naturalSkill.getX() - 3, naturalSkill.getY() - 2, this);
                    }
                }
            }
        }


//        tcp.draw(effect.getGraphics(), 0, 0);
        // g.drawImage(this.imageIcon2.getImage(), 11, 37, 264, 291, this);
        // Graphics g2 = g.create(317, 150, 130, 175);
        // box.paint(g2);
        // g2.dispose();

    }

    public JLabel getEffect() {
        return effect;
    }

    public void setEffect(JLabel effect) {
        this.effect = effect;
    }

    /**
     * 显示技能描述
     */
    public void skillmsg(Skill skill, int skillwl) {
        this.box.setText(null);
        if (skill != null) {
            if (skillwl > 0) {
                box.addText("  该技能处于#G悟灵状态#r");
                box.addText("     等级：" + skillwl + "/10级 #r");
            }
//            else if (Integer.parseInt(skill.getSkillid()) == 1833 || Integer.parseInt(skill.getSkillid()) == 1871 ||
//                    Integer.parseInt(skill.getSkillid()) == 1612 || Integer.parseInt(skill.getSkillid()) == 1872 ||
//                    Integer.parseInt(skill.getSkillid()) == 1831 || Integer.parseInt(skill.getSkillid()) == 1611 ||
//                    Integer.parseInt(skill.getSkillid()) == 1834 || Integer.parseInt(skill.getSkillid()) == 1838 ||
//                    Integer.parseInt(skill.getSkillid()) == 1880 || Integer.parseInt(skill.getSkillid()) == 1835 ||
//                    Integer.parseInt(skill.getSkillid()) == 1836 || Integer.parseInt(skill.getSkillid()) == 1600 ||
//                    Integer.parseInt(skill.getSkillid()) == 1601 || Integer.parseInt(skill.getSkillid()) == 1602 ||
//                    Integer.parseInt(skill.getSkillid()) == 1603 || Integer.parseInt(skill.getSkillid()) == 1604 ||
//                    Integer.parseInt(skill.getSkillid()) == 1604 || Integer.parseInt(skill.getSkillid()) == 1604 ||
//                    Integer.parseInt(skill.getSkillid()) == 1836 || Integer.parseInt(skill.getSkillid()) == 1850
//                    || Integer.parseInt(skill.getSkillid()) == 1852 || Integer.parseInt(skill.getSkillid()) == 1854
//                    || Integer.parseInt(skill.getSkillid()) == 1839) {
            else if (Integer.parseInt(skill.getSkillid()) == 1264 || Integer.parseInt(skill.getSkillid()) == 1265 ||
                    Integer.parseInt(skill.getSkillid()) == 1266 || Integer.parseInt(skill.getSkillid()) == 1267 ||
                    Integer.parseInt(skill.getSkillid()) == 1268 || Integer.parseInt(skill.getSkillid()) == 1269 ||
                    Integer.parseInt(skill.getSkillid()) == 1270 || Integer.parseInt(skill.getSkillid()) == 1271 ||
                    Integer.parseInt(skill.getSkillid()) == 1272 || Integer.parseInt(skill.getSkillid()) == 1273) {
                box.addText("     此技能可以#G悟灵#r");
                box.addText(" #r");
            }
            else {
//                box.addText("#c5F9F9F     此技能无法悟灵#r");
//                box.addText(" #r");
            }

            if (Integer.parseInt(skill.getSkillid()) < 1100) {
                String setText = this.setText(skill, 1.0, 200);
                if (setText != null) {
                    this.box.addText(setText);
                }
            } else {
                String msg = skill.getRemark();
                double sv = Double.parseDouble(skill.getGrow());// 技能成长
                long qm = UserMessUntil.getChosePetMes().getFriendliness();
                double value = Double.parseDouble(skill.getValue());// 介值
                //天降流火
                if (skill.getSkillid().equals("1237")) {
                    msg = msg.replace("{0}", String.format("%.2f", value + CustomFunction.XS(qm, sv)));
                    msg = msg.replace("{1}", String.format("%.2f", 25 + CustomFunction.XS(qm, sv)));
                    //归去来兮
                    //一御当千
                } else if (skill.getSkillid().equals("1238") || skill.getSkillid().equals("1240")) {
                    msg = msg.replace("{0}", String.format("%.2f", value + CustomFunction.XS(qm, sv)));
                    double v = Double.parseDouble(skill.getValue1() == null || "".equals(skill.getValue1()) ? "0" : skill.getValue1());
                    double xs = CustomFunction.XS(qm, Double.parseDouble(skill.getGrow1() == null || "".equals(skill.getGrow1()) ? "0" : skill.getGrow1()));
                    msg = msg.replace("{1}",
                            String.format("%.2f", Arith.add(v, xs)));
                } else if (skill.getSkillid().equals("1241")) {
                    msg = msg.replace("{0}", String.format("%.2f", value + CustomFunction.XS(qm, sv)));
                } else if (skill.getSkillid().equals("1216")) {
                    msg = msg.replace("{0}", String.format("%.2f", value + CustomFunction.XS(qm, sv)));
                    msg = msg.replace("{1}", String.format("%.2f", value + CustomFunction.XS(qm, sv)));
                }
                String[] v = PetSkillsJpanel.StringReplace(msg).split("\\|");
                int i = 0;
                while (i < v.length) {
                    String vg;
                    String[] v1 = v[i].split("=");
                    if (msg.contains("=")) {
                        if (skill.getSkilltype().equals("4") && v1[1].equals("0/999")) {
                            v1[1] = UserMessUntil.getChosePetMes().getTrainNum() + "/999";

                        }
                        if ((vg = this.gongshi(v, i)) != null) {
                            this.box.addText("#c" + v1[0] + " " + v1[1] + "#c" + v[++i].split("=")[0] + vg + "#r");
                        } else {
                            this.box.addText("#c" + v1[0] + " " + v1[1] + "#r");
                        }
                    }else{
                        this.box.addText("#c#Y" + " " + skill.getSkillname() + "#r"+ " #W" + msg);
                    }
                    ++i;
                }
                Dimension d = this.box.computeSize(130);
                this.box.setSize(d);
                this.box.setPreferredSize(d);
            }
        }
    }


    /** 当召唤兽技能是人物技能时 */
    public String setText(Skill skill, double sld, int lvl) {

        String msg = skill.getRemark();
        int id = Integer.parseInt(skill.getSkillid());
        if (id < 1001 || id > 1100) {
            return null;
        }
        int level = Integer.parseInt(skill.getSkilllevel());// 技能等级
        double sv = Double.parseDouble(skill.getGrow());// 技能成长
        double mv = Double.parseDouble(skill.getDielectric());// 耗蓝介质
        double value = Double.parseDouble(skill.getValue());// 介值
        String type = id <= 1005 ? "混乱" : id <= 1010 ? "封印" : id <= 1015 ? "昏睡" : id <= 1020 ? "中毒" : id <= 1025 ? "震慑"
                : id <= 1030 ? "力量" : id <= 1035 ? "抗性" : id <= 1040 ? "加速" : id <= 1045 ? "风" : id <= 1050 ? "雷"
                : id <= 1055 ? "水" : id <= 1060 ? "火" : id <= 1065 ? "鬼火" : id <= 1070 ? "三尸虫"
                : id <= 1075 ? "遗忘" : id <= 1080 ? "smmh" : id <= 1085 ? "霹雳" : id <= 1090 ? "沧波"
                : id <= 1095 ? "甘霖" : "扶摇";

        msg = msg.replace("|个数|", FBUtil.geshu(level, (int) sld, type) + "");
        if (id <= 1015 || (id >= 1071 && id <= 1075)) {
            BigDecimal skillhitrate = new BigDecimal(value + sv
                    * new BigDecimal(Math.pow(sld, 0.3)).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
            msg = msg.replace("|几率|", skillhitrate.setScale(2, BigDecimal.ROUND_HALF_UP).toString());
            msg = msg.replace("|回合|", "7");
        } else if (id <= 1020) {
            // 命中概率
            BigDecimal skillhitrate = new BigDecimal(((double) ((int) ((value + sld * sv / 1000) * 1000)) / 15) * 17);
            msg = msg.replace("|伤害|", level > 3 ? "15" : level > 1 ? "12.5" : "10");
            msg = msg.replace("|几率|", skillhitrate.setScale(2, BigDecimal.ROUND_HALF_UP).toString());
            msg = msg.replace("|回合|", "3");
        } else if (id <= 1040 || (id >= 1076 && id <= 1080)) {
            BigDecimal skillhitrate = new BigDecimal((double) ((int) ((value + sld * sv / 1000) * 1000)) / 10);
            msg = msg.replace("|回合|", "7");
            msg = msg.replace("|伤害|", skillhitrate.setScale(2, BigDecimal.ROUND_HALF_UP).toString());
        } else if (id <= 1065 || id >= 1081) {
            BigDecimal skillhitrate = new BigDecimal((value + sv * (1 + 5 * sld / 5000 * (10 - sld / 5000) / 2)) * lvl);
            msg = msg.replace("|伤害|", skillhitrate.intValue() + "");
        } else if (id <= 1070) {
            msg = msg.replace("|伤害|", (int) ((value * lvl + sld * sv / 1000) * 1000) + "");
            msg = msg.replace("|几率|", (int) (value * 100 + (int) (sld / 250)) + "");
        }
        msg = msg.replace("|蓝|", (int) (mv * ((sld / 25000) + 1)) + "");
        return msg;
    }

    /**
     * 公式判断
     */
    public String gongshi(String[] v, int i) {
        // 判断是否有下一个
        if (v.length > i + 1) {
            String[] vs = v[i + 1].split("=");
            if (vs.length > 1) {
                if (vs[1].equals("{公式一}") || vs[1].equals("{公式二}") || vs[1].equals("{公式三}") || vs[1].equals("{公式四}")
                        || vs[1].equals("{公式五}")) {
                    return 1 + "";
                }
            }
        }
        return null;
    }

    /**
     * 字符串替换
     */
    public static String StringReplace(String vs) {
        Pattern p = Pattern.compile(">(.*?)<");
        Matcher m = p.matcher(vs);
        Pattern pend = Pattern.compile("'#(.*?)'");
        Matcher mend = pend.matcher(vs);
        StringBuffer sb1 = new StringBuffer();
        while (mend.find()) {
            String s = mend.group();
            if (!sb1.toString().equals("")) {
                sb1.append("|" + s.split("'#")[1].split("'")[0]);
            } else {
                sb1.append(s.split("'#")[1].split("'")[0]);
            }
        }
        StringBuffer sb = new StringBuffer();
        while (m.find()) {
            String s = m.group();
            if (!s.equals("><")) {
                if (!sb.toString().equals("")) {
                    sb.append("|" + s.split(">")[1].split("<")[0]);

                } else {
                    sb.append(s.split(">")[1].split("<")[0]);
                }
            }

        }

        StringBuffer buffer = new StringBuffer();
        String[] v = sb1.toString().split("\\|");
        String[] v1 = sb.toString().split("\\|");
        for (int i = 0; i < v.length && i < v1.length; i++) {
            if (!buffer.toString().equals("")) {
                buffer.append("|" + v[i] + "=" + v1[i]);
            } else {
                buffer.append(v[i] + "=" + v1[i]);
            }
        }
        return buffer.toString();
    }

    public JList<String> getListNaturalskill() {
        return listNaturalskill;
    }

    public void setListNaturalskill(JList<String> listNaturalskill) {
        this.listNaturalskill = listNaturalskill;
    }

    public JList<String> getListpetskill() {
        return listpetskill;
    }

    public void setListpetskill(JList<String> listpetskill) {
        this.listpetskill = listpetskill;
    }

    public DefaultListModel<String> getModelNaturalskill() {
        return modelNaturalskill;
    }

    public void setModelNaturalskill(DefaultListModel<String> modelNaturalskill) {
        this.modelNaturalskill = modelNaturalskill;
    }

    public DefaultListModel<String> getModelpetskill() {
        return modelpetskill;
    }

    public void setModelpetskill(DefaultListModel<String> modelpetskill) {
        this.modelpetskill = modelpetskill;
    }

    public JScrollPane getjScrollPane1() {
        return jScrollPane1;
    }

    public void setjScrollPane1(JScrollPane jScrollPane1) {
        this.jScrollPane1 = jScrollPane1;
    }

    public JScrollPane getjScrollPane2() {
        return jScrollPane2;
    }

    public void setjScrollPane2(JScrollPane jScrollPane2) {
        this.jScrollPane2 = jScrollPane2;
    }

    public RichLabel getBox() {
        return box;
    }

    public void setBox(RichLabel box) {
        this.box = box;
    }

    public JLabel[] getLabPetskills() {
        return labPetskills;
    }

    public void setLabPetskills(JLabel[] labPetskills) {
        this.labPetskills = labPetskills;
    }

    public ShowPetSkillsMouslisten[] getShowPetSkills() {
        return showPetSkills;
    }

    public void setShowPetSkills(ShowPetSkillsMouslisten[] showPetSkills) {
        this.showPetSkills = showPetSkills;
    }

    public DeleteSkillBtn getSupportListBtn() {
        return supportListBtn;
    }

    public void setSupportListBtn(DeleteSkillBtn supportListBtn) {
        this.supportListBtn = supportListBtn;
    }

    public DeleteSkillBtn getDeleteSkillBtn() {
        return deleteSkillBtn;
    }

    public void setDeleteSkillBtn(DeleteSkillBtn deleteSkillBtn) {
        this.deleteSkillBtn = deleteSkillBtn;
    }

    public String getPetskillID() {
        return petskillID;
    }

    public void setPetskillID(String petskillID) {
        this.petskillID = petskillID;
    }

    public int getPetskillNO() {
        return petskillNO;
    }

    public void setPetskillNO(int petskillNO) {
        this.petskillNO = petskillNO;
    }
    public JLabel[] getQlPetskills() {
        return this.qlPetskills;
    }

    public void setQlPetskills(JLabel[] qlPetSkills) {
        this.qlPetskills = qlPetSkills;
    }

    public ShowPetSkillsMouslisten[] getShowQlPetSkills() {
        return this.showQlPetSkills;
    }

    public void setShowQlPetSkills(ShowPetSkillsMouslisten[] showQlPetSkills) {
        this.showQlPetSkills = showQlPetSkills;
    }
    public Sprite getTcp() {
        return tcp;
    }

    public void setTcp(Sprite tcp) {
        this.tcp = tcp;
    }
    /**
     * 鼠标进入
     * @param e
     */
    public void mouseEntered(MouseEvent e) {
        MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
    }
    /**
     * 鼠标离开
     * @param e
     */
    public void mouseExited(MouseEvent e) {
        MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
    }


    public ShowPetSkillsMouslisten[] getShowPetSkillsTS() {
        return showPetSkillsTS;
    }


    public void setShowPetSkillsTS(ShowPetSkillsMouslisten[] showPetSkillsTS) {
        this.showPetSkillsTS = showPetSkillsTS;
    }


    public JLabel[] getLabPetskillsTS() {
        return labPetskillsTS;
    }


    public void setLabPetskillsTS(JLabel[] labPetskillsTS) {
        this.labPetskillsTS = labPetskillsTS;
    }
    public JLabel[] getNaturalSkills() {
        return naturalSkills;
    }

    public void setNaturalSkills(JLabel[] naturalSkills) {
        this.naturalSkills = naturalSkills;
    }

}
